#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int five(int x)
{
    if (x < 10)
        return x;
    else
        return x % 10 + five(x / 10);
}

int main() {
    int a = 0, b = 0;
    scanf("%d%d", &a, &b);
    int count = 0;
    for (int i = a; i <= b; i++)
    {
        if (five(i) % 5 == 0)
            count++;
    }
    printf("%d", count);
    return 0;
}